Optimal. Leaf size=197 \[ -\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \text {ArcTan}\left (e^{\tanh ^{-1}(a x)}\right ) \tanh ^{-1}(a x)^2-4 a \tanh ^{-1}(a x) \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+2 i a \tanh ^{-1}(a x) \text {PolyLog}\left (2,-i e^{\tanh ^{-1}(a x)}\right )-2 i a \tanh ^{-1}(a x) \text {PolyLog}\left (2,i e^{\tanh ^{-1}(a x)}\right )+2 a \text {PolyLog}\left (2,-\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 a \text {PolyLog}\left (2,\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 i a \text {PolyLog}\left (3,-i e^{\tanh ^{-1}(a x)}\right )+2 i a \text {PolyLog}\left (3,i e^{\tanh ^{-1}(a x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6161, 6155,
6165, 6099, 4265, 2611, 2320, 6724} \begin {gather*} -\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \tanh ^{-1}(a x)^2 \text {ArcTan}\left (e^{\tanh ^{-1}(a x)}\right )+2 a \text {Li}_2\left (-\frac {\sqrt {1-a x}}{\sqrt {a x+1}}\right )-2 a \text {Li}_2\left (\frac {\sqrt {1-a x}}{\sqrt {a x+1}}\right )+2 i a \tanh ^{-1}(a x) \text {Li}_2\left (-i e^{\tanh ^{-1}(a x)}\right )-2 i a \tanh ^{-1}(a x) \text {Li}_2\left (i e^{\tanh ^{-1}(a x)}\right )-2 i a \text {Li}_3\left (-i e^{\tanh ^{-1}(a x)}\right )+2 i a \text {Li}_3\left (i e^{\tanh ^{-1}(a x)}\right )-4 a \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {a x+1}}\right ) \tanh ^{-1}(a x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2320
Rule 2611
Rule 4265
Rule 6099
Rule 6155
Rule 6161
Rule 6165
Rule 6724
Rubi steps
\begin {align*} \int \frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x^2} \, dx &=-\left (a^2 \int \frac {\tanh ^{-1}(a x)^2}{\sqrt {1-a^2 x^2}} \, dx\right )+\int \frac {\tanh ^{-1}(a x)^2}{x^2 \sqrt {1-a^2 x^2}} \, dx\\ &=-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-a \text {Subst}\left (\int x^2 \text {sech}(x) \, dx,x,\tanh ^{-1}(a x)\right )+(2 a) \int \frac {\tanh ^{-1}(a x)}{x \sqrt {1-a^2 x^2}} \, dx\\ &=-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \tan ^{-1}\left (e^{\tanh ^{-1}(a x)}\right ) \tanh ^{-1}(a x)^2-4 a \tanh ^{-1}(a x) \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+2 a \text {Li}_2\left (-\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 a \text {Li}_2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+(2 i a) \text {Subst}\left (\int x \log \left (1-i e^x\right ) \, dx,x,\tanh ^{-1}(a x)\right )-(2 i a) \text {Subst}\left (\int x \log \left (1+i e^x\right ) \, dx,x,\tanh ^{-1}(a x)\right )\\ &=-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \tan ^{-1}\left (e^{\tanh ^{-1}(a x)}\right ) \tanh ^{-1}(a x)^2-4 a \tanh ^{-1}(a x) \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+2 i a \tanh ^{-1}(a x) \text {Li}_2\left (-i e^{\tanh ^{-1}(a x)}\right )-2 i a \tanh ^{-1}(a x) \text {Li}_2\left (i e^{\tanh ^{-1}(a x)}\right )+2 a \text {Li}_2\left (-\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 a \text {Li}_2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-(2 i a) \text {Subst}\left (\int \text {Li}_2\left (-i e^x\right ) \, dx,x,\tanh ^{-1}(a x)\right )+(2 i a) \text {Subst}\left (\int \text {Li}_2\left (i e^x\right ) \, dx,x,\tanh ^{-1}(a x)\right )\\ &=-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \tan ^{-1}\left (e^{\tanh ^{-1}(a x)}\right ) \tanh ^{-1}(a x)^2-4 a \tanh ^{-1}(a x) \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+2 i a \tanh ^{-1}(a x) \text {Li}_2\left (-i e^{\tanh ^{-1}(a x)}\right )-2 i a \tanh ^{-1}(a x) \text {Li}_2\left (i e^{\tanh ^{-1}(a x)}\right )+2 a \text {Li}_2\left (-\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 a \text {Li}_2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-(2 i a) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{\tanh ^{-1}(a x)}\right )+(2 i a) \text {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{\tanh ^{-1}(a x)}\right )\\ &=-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{x}-2 a \tan ^{-1}\left (e^{\tanh ^{-1}(a x)}\right ) \tanh ^{-1}(a x)^2-4 a \tanh ^{-1}(a x) \tanh ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )+2 i a \tanh ^{-1}(a x) \text {Li}_2\left (-i e^{\tanh ^{-1}(a x)}\right )-2 i a \tanh ^{-1}(a x) \text {Li}_2\left (i e^{\tanh ^{-1}(a x)}\right )+2 a \text {Li}_2\left (-\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 a \text {Li}_2\left (\frac {\sqrt {1-a x}}{\sqrt {1+a x}}\right )-2 i a \text {Li}_3\left (-i e^{\tanh ^{-1}(a x)}\right )+2 i a \text {Li}_3\left (i e^{\tanh ^{-1}(a x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 223, normalized size = 1.13 \begin {gather*} a \left (-\frac {\sqrt {1-a^2 x^2} \tanh ^{-1}(a x)^2}{a x}+2 \tanh ^{-1}(a x) \log \left (1-e^{-\tanh ^{-1}(a x)}\right )+i \tanh ^{-1}(a x)^2 \log \left (1-i e^{-\tanh ^{-1}(a x)}\right )-i \tanh ^{-1}(a x)^2 \log \left (1+i e^{-\tanh ^{-1}(a x)}\right )-2 \tanh ^{-1}(a x) \log \left (1+e^{-\tanh ^{-1}(a x)}\right )+2 \text {PolyLog}\left (2,-e^{-\tanh ^{-1}(a x)}\right )+2 i \tanh ^{-1}(a x) \text {PolyLog}\left (2,-i e^{-\tanh ^{-1}(a x)}\right )-2 i \tanh ^{-1}(a x) \text {PolyLog}\left (2,i e^{-\tanh ^{-1}(a x)}\right )-2 \text {PolyLog}\left (2,e^{-\tanh ^{-1}(a x)}\right )+2 i \text {PolyLog}\left (3,-i e^{-\tanh ^{-1}(a x)}\right )-2 i \text {PolyLog}\left (3,i e^{-\tanh ^{-1}(a x)}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.96, size = 0, normalized size = 0.00 \[\int \frac {\arctanh \left (a x \right )^{2} \sqrt {-a^{2} x^{2}+1}}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (a x - 1\right ) \left (a x + 1\right )} \operatorname {atanh}^{2}{\left (a x \right )}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atanh}\left (a\,x\right )}^2\,\sqrt {1-a^2\,x^2}}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________